#include<stdio.h>
#include<math.h>
int main(void)
{
    int H,W,B,N,i;
    scanf("%d",&N);
	for(i=1;i<=N;i++){
    scanf("%d %d",&H,&W);
    B=(H-100)*0.9*2;
    if(fabs(W-B)<B*0.1){
    	printf("You are wan mei!\n");
	}
	if(fabs(W-B)>=B*0.1&&W>B){
		printf("You are tai pang le!\n");
	}
	if(fabs(W-B)>=B*0.1&&W<B){
		printf("You are tai shou le!\n");
	}
    }
	return 0;
	
 } 
 
